package duotai;

public class Animal {
    public void voice(){
        System.out.println("普通动物叫声");
    }
    public static void run(){
        System.out.println("run");
    }
}

class Cat extends Animal{
    public void voice(){
        System.out.println("喵喵喵");
    }
    public void catchMouse(){
        System.out.println("抓老鼠");
    }
}

class Dog extends Animal{
    public void voice(){
        System.out.println("汪汪汪");
    }
}

class Pig extends Animal{
    public void voice(){
        System.out.println("噜噜噜噜");
    }
}